package com.only;

import org.springframework.mock.web.MockMultipartFile;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;



/**
 * @author: LCG
 * 作者: LCG
 * 日期: 2021/5/12  16:27
 * 描述:
 */
@RestController
public class TestController {


   @RequestMapping("up")
   public void testFile(MultipartFile file123){

       System.out.println("orign-->"+file123.getOriginalFilename());

       System.out.println("name--->"+file123.getName());

       System.out.println("--->"+file123.getContentType());

       /*ultipartFile multipartFile=new MockMultipartFile("参数的名称","文件的名称带后缀的例如 123.pdf","application/pdf",bytes);*/

   }

}
